<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.jiabonet.DB.staticBean"%>
<%
String path = request.getContextPath();
String Admin = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+staticBean.getAdminDir();
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>添加客户信息</title>
<link href="<%=path%>/Public/css/AdminCss.css" rel="stylesheet" type="text/css" />
<script src="<%=path%>/Public/js/jquery.min.js" type="text/javascript"></script>
<script src="<%=path%>/Public/js/jquery.form.js"></script>
<script src="<%=path%>/Public/js/Ajax.js"></script>
<script type="text/javascript">
$(function(){
	$("#tables tr").hover(
	  function () {
		$(this).css("background","#d5f4fe");
	  },
	  function () {
		$(this).css("background","#fff");
	  }
	);

	AjaxJson(CheckFormFun,"<%=path%>/Client!Client_ClientAdd.action?T="+Math.random(),"Fm_Client",returnAddFun);
	
});	

function CheckFormFun(){
	var name = $("#Name");
	var Company = $("#Company");
	if(name.val().length == 0){ alert('供货商名称，*为必填项'); name.focus(); return false;}
	if(Company.val().length == 0){ alert('（供货商公司名称，*为必填项）'); Company.focus(); return false;}
}

function returnAddFun(msg){
	if(msg.isOK==1){
		$("#IsSend").show();
		$("#IsSend1").html(msg.returnInfo).css("color","#69D172");
	}else{
		$("#IsSend").show();
		$("#IsSend1").html(msg.returnInfo).css("color","red");
		
	}
}
</script>


</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
          <td>
			<table width="100%" border="0" cellspacing="0"
				cellpadding="0">
				<tr>
					<td width="6%" height="24" valign="center">
						<div align="center">
							<img src="<%=Admin %>/images/tb.gif" width="14" height="14" />
						</div>
					</td>
					<td width="94%" height="24" valign="center">
						<span class="STYLE1"> <strong>添加客户基本信息</strong>
						</span>
					</td>
				</tr>
			</table>
		</td>
            <td><div align="right"><span class="STYLE1">
              &nbsp;&nbsp;<img src="<%=Admin %>/images/edit.gif" width="10" height="10" /> 当前用户：<%=session.getAttribute("Username") %>  &nbsp;</span><span class="STYLE1"> &nbsp;</span></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
    <form id="Fm_Client" name="Fm_Client" method="post">
	<table width="100%" border="0" cellpadding="0" cellspacing="1"
		bgcolor="#a8c7ce" id="tables">
		<tr height="30">
			<td width="12%" bgcolor="d3eaef" class="STYLE6">
				<div align="center">
					<span class="STYLE10">客户名称：</span>				</div>		  </td>
			<td width="33%" bgcolor="d3eaef" class="STYLE6">
				<div align="left">
					<span class="STYLE10" style="margin-left: 15px;">
					<input type="text" value="" name="client.Name" id="Name" maxlength="32" size="24"/>
		  </span>				</div>		  </td>
			<td width="55%" bgcolor="d3eaef" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;"><font color="#990000">*</font>（客户名称，*为必填项）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="30">
          <td class="STYLE6"><div align="center"> <span class="STYLE10">客户公司：</span> </div></td>
		  <td class="STYLE6"><div align="left"><span class="STYLE10" style="margin-left: 15px;">
		    <input type="text" value="" name="client.Company" id="Company" maxlength="32" size="24"/>
		  </span></div></td>
		  <td class="STYLE6"><div align="left"> <span class="STYLE10" style="margin-left: 15px;"><font color="#990000">*</font>（客户公司名称，*为必填项）</span> </div></td>
	    </tr>
		<tr bgcolor="#ffffff" height="30">
          <td class="STYLE6"><div align="center"> <span class="STYLE10">业务员：</span> </div></td>
		  <td class="STYLE6"><div align="left"> <span class="STYLE10" style="margin-left: 15px;">
              <select name="client.Salesman" id="Salesman">
                <s:iterator value="List" id="Staff">
                  <option value="<s:property value="#Staff.Name"/>">
                  <s:property value="#Staff.Name"/>
                  </option>
                </s:iterator>
              </select>
          </span> </div></td>
		  <td class="STYLE6"><div align="left"> <span class="STYLE10" style="margin-left: 15px;"><font color="#990000">*</font>（公司对客户的负责人，或业务员，*为必填项）</span> </div></td>
	    </tr>
		<tr bgcolor="#ffffff" height="30">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">联系电话：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left">
					<span class="STYLE10" style="margin-left: 15px;">
					<input type="text" value="" name="client.Tel" id="Tel" maxlength="32" size="24"/>
		  </span>				</div>		  </td>
			<td width="55%"  class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;">（客户联系电话，或者传真号码）</span>				</div>		  </td>
		</tr>
			<tr bgcolor="#ffffff" height="30">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">手机号码：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left">
			  <span class="STYLE10" style="margin-left: 15px;"> <input
							type="text" value="" id="Phone" maxlength="32" size="30"
							name="client.Phone"> </span>				</div>		  </td>
			<td width="55%" class="STYLE6">
				<div align="left">
			  <span class="STYLE10" style="margin-left: 15px;">（客户手机号码）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="30">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">详细地址：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;"> <input
							type="text" id="Address" value="" maxlength="32" size="30"
							name="client.Address"> </span>				</div>		  </td>
			<td width="55%" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;">（客户公司地址）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="30">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">职　　务：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left"><span class="STYLE10" style="margin-left: 15px;">
				  <input type="text" value="" id="Duties" maxlength="32" size="30" name="client.Duties">
		  </span></div>		  </td>
			<td width="55%" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;">（客户负责人职务）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="30">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">性别：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left">
				<span class="STYLE10" style="margin-left: 15px;">
				      男 <input type="radio" name="client.Sex" value="1" checked="checked"> 女 <input type="radio" name="client.Sex" value="0">
	       </span>			    </div>		  </td>
			<td width="55%" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;">（客户负责人性别）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="30">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">QQ：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left"><span class="STYLE10" style="margin-left: 15px;">
				  <input
							type="text" value="" id="Qq" maxlength="32" size="30"
							name="client.Qq">
		  </span></div>		  </td>
			<td width="55%" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;">（客户负责人联系QQ）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="30">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">电子邮件：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left"><span class="STYLE10" style="margin-left: 15px;">
				  <input
							type="text" value="" id="Email" maxlength="32" size="30"
							name="client.Email">
		  </span></div>		  </td>
			<td width="55%" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;">（客户负责人联系电子邮件）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="30">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">网址：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left"><span class="STYLE10" style="margin-left: 15px;">
				  <input
							type="text" value="" id="Http" maxlength="32" size="30"
							name="client.Http">
		  </span></div>		  </td>
			<td width="55%" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;">（客户公司网址，加http://）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="50">
			<td width="12%" class="STYLE6">
				<div align="center">
					<span class="STYLE10">使用说明：</span>				</div>		  </td>
			<td width="33%" class="STYLE6">
				<div align="left">
					<span class="STYLE10" style="margin-left: 15px;"> 
					<textarea rows="5" cols="30" name="client.Content" id="Content"></textarea>
		  </span>				</div>		  </td>
			<td width="55%" class="STYLE6">
				<div align="left">
		  <span class="STYLE10" style="margin-left: 15px;">（能留空，如果不为空则不能小于6位）</span>				</div>		  </td>
		</tr>
		<tr bgcolor="#ffffff" height="30">
			<td colspan="3" bgcolor="#ffffff" class="STYLE6">
				<div align="left" style="padding-left: 50px;">
					<span class="STYLE10"> <input type="submit" value="确定"
							name="send" >&nbsp;&nbsp; <input type="button"
							value="关闭" onClick="window.close();" name="send"> </span>				</div>			</td>
		</tr>
		<tr bgcolor="#ffffff" height="30" id="IsSend" style="display:none;">
			<td colspan="3" bgcolor="#ffffff" class="STYLE6">
				<div align="left" style="padding-left: 50px;">
					<span class="STYLE10" id="IsSend1">					</span>				</div>			</td>
		</tr>
	</table>
	</form>
	</td>
  </tr>
</table>
</body>
</html>